//
//  SettingsViewController.m
//  CandyCrushClone
//
//  Created by Petar on 4/10/15.
//  Copyright (c) 2015 Nestorov Engineering. All rights reserved.
//

#import "SettingsViewController.h"
#import "UIView+Animations.h"
#import "AudioController.h"
#import "Tracker.h"

@interface SettingsViewController ()

@property (weak, nonatomic) IBOutlet UIButton *backButton;
@property (weak, nonatomic) IBOutlet UIButton *feedbackButton;

@end

@implementation SettingsViewController

- (void)viewDidLoad
{
    
    [super viewDidLoad];

    [Tracker trackEvent:@"Seen Settings" withParams:nil];
    
}


- (void)viewWillAppear:(BOOL)animated
{
    
    [super viewWillAppear:animated];

    [_backButton startWobbleAnimationAfterDuration:0];
    [_feedbackButton startWobbleAnimationAfterDuration:0.5f];
    
}


-(void)viewWillDisappear:(BOOL)animated
{
    
    [super viewWillDisappear:animated];
    
    [_backButton stopAllAnimations];
    [_feedbackButton stopAllAnimations];
    
}


- (IBAction)didPressBackButton:(id)sender
{
    
    [[AudioController sharedInstance] playButtonClick];
    [self.navigationController popViewControllerAnimated:YES];
    
}


- (IBAction)didPressFeedbackButton:(id)sender
{
    
    [[AudioController sharedInstance] playButtonClick];
    [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"https://nestorovengineering.wordpress.com/contact-us/"]];
    
}


- (BOOL)prefersStatusBarHidden
{
    return YES;
}


@end
